package com.acsior.hibernate.vo;

// default package

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

import com.acsior.dac.impl.hibernate.vo.GeneratorKey;
import com.acsior.dac.impl.hibernate.vo.HibernatePersistantIntegerIdVO;

/**
 * StationCashBoxTransaction entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "station_cash_box_transactions")
@GeneratorKey(tableName = "station_cash_box_transactions")
public class StationCashBoxTransactionVO extends HibernatePersistantIntegerIdVO {

	/** */
	private static final long serialVersionUID = -1440767641104176854L;

	// Fields

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "station_cash_box_id", nullable = false)
	private StationCashBoxVO stationCashBox;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "approver_employee_id")
	private EmployeeVO approver;

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "nom_cash_box_transaction_type_id", nullable = false)
	private NomCashBoxTransactionTypeVO nomCashBoxTransactionType;

	@Column(name = "amount", nullable = false, precision = 10)
	private double amount;

	@Column(name = "balance", precision = 10)
	private Double balance;

	@Column(name = "confirmed", nullable = false)
	private boolean confirmed;

	@Column(name = "request_time", nullable = false, length = 23)
	private Date requestTime;

	@Column(name = "balance_change_time", length = 23)
	private Date balanceChangeTime;

	@Column(name = "notes")
	private String notes;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "transaction")
	private List<StationCashBoxTransactionCashDeskVO> cashDeskDetails;

	@OneToMany(cascade = CascadeType.ALL, fetch = FetchType.LAZY, mappedBy = "transaction")
	private List<StationCashBoxTransactionPostmanVO> postmanDetails;

	// Constructors

	/** default constructor */
	public StationCashBoxTransactionVO() {
		super();
		this.cashDeskDetails = new ArrayList<StationCashBoxTransactionCashDeskVO>();
		this.postmanDetails = new ArrayList<StationCashBoxTransactionPostmanVO>();
	}

	
	/**
	 * @return стойността на stationCashBox
	 */
	public StationCashBoxVO getStationCashBox() {
		return this.stationCashBox;
	}

	
	/**
	 * @param stationCashBox се залага в stationCashBox
	 */
	public void setStationCashBox(StationCashBoxVO stationCashBox) {
		this.stationCashBox = stationCashBox;
	}

	
	/**
	 * @return стойността на approver
	 */
	public EmployeeVO getApprover() {
		return this.approver;
	}

	
	/**
	 * @param approver се залага в approver
	 */
	public void setApprover(EmployeeVO approver) {
		this.approver = approver;
	}

	
	/**
	 * @return стойността на nomCashBoxTransactionType
	 */
	public NomCashBoxTransactionTypeVO getNomCashBoxTransactionType() {
		return this.nomCashBoxTransactionType;
	}

	
	/**
	 * @param nomCashBoxTransactionType се залага в nomCashBoxTransactionType
	 */
	public void setNomCashBoxTransactionType(NomCashBoxTransactionTypeVO nomCashBoxTransactionType) {
		this.nomCashBoxTransactionType = nomCashBoxTransactionType;
	}

	
	/**
	 * @return стойността на amount
	 */
	public double getAmount() {
		return this.amount;
	}

	
	/**
	 * @param amount се залага в amount
	 */
	public void setAmount(double amount) {
		this.amount = amount;
	}

	
	/**
	 * @return стойността на balance
	 */
	public Double getBalance() {
		return this.balance;
	}

	
	/**
	 * @param balance се залага в balance
	 */
	public void setBalance(Double balance) {
		this.balance = balance;
	}

	
	/**
	 * @return стойността на confirmed
	 */
	public boolean isConfirmed() {
		return this.confirmed;
	}

	
	/**
	 * @param confirmed се залага в confirmed
	 */
	public void setConfirmed(boolean confirmed) {
		this.confirmed = confirmed;
	}

	
	/**
	 * @return стойността на requestTime
	 */
	public Date getRequestTime() {
		return this.requestTime;
	}

	
	/**
	 * @param requestTime се залага в requestTime
	 */
	public void setRequestTime(Date requestTime) {
		this.requestTime = requestTime;
	}

	
	/**
	 * @return стойността на balanceChangeTime
	 */
	public Date getBalanceChangeTime() {
		return this.balanceChangeTime;
	}

	
	/**
	 * @param balanceChangeTime се залага в balanceChangeTime
	 */
	public void setBalanceChangeTime(Date balanceChangeTime) {
		this.balanceChangeTime = balanceChangeTime;
	}

	
	/**
	 * @return стойността на notes
	 */
	public String getNotes() {
		return this.notes;
	}

	
	/**
	 * @param notes се залага в notes
	 */
	public void setNotes(String notes) {
		this.notes = notes;
	}

	
	/**
	 * @return стойността на cashDeskDetails
	 */
	public List<StationCashBoxTransactionCashDeskVO> getCashDeskDetails() {
		return this.cashDeskDetails;
	}

	
	/**
	 * @param cashDeskDetails се залага в cashDeskDetails
	 */
	public void setCashDeskDetails(List<StationCashBoxTransactionCashDeskVO> cashDeskDetails) {
		this.cashDeskDetails = cashDeskDetails;
	}

	
	/**
	 * @return стойността на postmanDetails
	 */
	public List<StationCashBoxTransactionPostmanVO> getPostmanDetails() {
		return this.postmanDetails;
	}

	
	/**
	 * @param postmanDetails се залага в postmanDetails
	 */
	public void setPostmanDetails(List<StationCashBoxTransactionPostmanVO> postmanDetails) {
		this.postmanDetails = postmanDetails;
	}
}